﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls
{
    /// <summary>
    ///有创平均压
    /// </summary>
    public partial class YCPJYCtrl : RealVitalIcon
    {
        public YCPJYCtrl()
        {
            InitializeComponent();
            DefaultColor= Brushes.Red;
            ResizeIcon();
        }

        public override void ResizeIcon()
        {
            Brush color = Brushes.Red;

            Line leftLine = new Line();
            leftLine.X1 = 0;
            leftLine.Y1 = 0;
            leftLine.X2 = 0;
            leftLine.Y2 = this.Height;
            leftLine.Stroke = color;
            leftLine.StrokeThickness = StrokeThickness;
            _grid.Children.Add(leftLine);

            Line topLine = new Line();
            topLine.X1 = 0;
            topLine.Y1 = 0;
            topLine.X2 = this.Width;
            topLine.Y2 = 0;
            topLine.Stroke = color;
            topLine.StrokeThickness = StrokeThickness;
            _grid.Children.Add(topLine);

            Line rightLine = new Line();
            rightLine.X1 = this.Width;
            rightLine.Y1 = 0;
            rightLine.X2 = this.Width;
            rightLine.Y2 = this.Height;
            rightLine.Stroke = color;
            rightLine.StrokeThickness = StrokeThickness;
            _grid.Children.Add(rightLine);


            Line rootLine = new Line();
            rootLine.X1 = 0;
            rootLine.Y1 = this.Height;
            rootLine.X2 = this.Width;
            rootLine.Y2 = this.Height;
            rootLine.Stroke = color;
            rootLine.StrokeThickness = StrokeThickness;
            _grid.Children.Add(rootLine);
        }
    }
}
